;Assembler header file for Filer
;written by DefMod (Dec 31 2005) on Sat Dec 31 14:01:37 2005
;Jonathan Coxhead, jonathan@doves.demon.co.uk, 23 June 1995

        [       :LNOT: :DEF: Filer_Hdr
        GBLS    Filer_Hdr

        [       :LNOT: :DEF: Get_Types
        GBLS    Get_Types
        ]
        [       :LNOT: :DEF: Types_Hdr
Get_Types                       SETS    "GET oslib/Types.Hdr"
        |
Get_Types                       SETS    ""
        ]
        $Get_Types

        [       :LNOT: :DEF: Get_OS
        GBLS    Get_OS
        ]
        [       :LNOT: :DEF: OS_Hdr
Get_OS                          SETS    "GET oslib/OS.Hdr"
        |
Get_OS                          SETS    ""
        ]
        $Get_OS

        [       :LNOT: :DEF: Get_Wimp
        GBLS    Get_Wimp
        ]
        [       :LNOT: :DEF: Wimp_Hdr
Get_Wimp                        SETS    "GET oslib/Wimp.Hdr"
        |
Get_Wimp                        SETS    ""
        ]
        $Get_Wimp

        [       :LNOT: :DEF: Get_FileSwitch
        GBLS    Get_FileSwitch
        ]
        [       :LNOT: :DEF: FileSwitch_Hdr
Get_FileSwitch                  SETS    "GET oslib/FileSwitch.Hdr"
        |
Get_FileSwitch                  SETS    ""
        ]
        $Get_FileSwitch

        [       :LNOT: :DEF: Get_FilerAction
        GBLS    Get_FilerAction
        ]
        [       :LNOT: :DEF: FilerAction_Hdr
Get_FilerAction                 SETS    "GET oslib/FilerAction.Hdr"
        |
Get_FilerAction                 SETS    ""
        ]
        $Get_FilerAction

;Symbols for constants
Error_FilerNoRecursion          *       &B80
Error_FilerNoTemplate           *       &B81
Error_FilerFailedSave           *       &B82
Error_FilerBadPath              *       &B83
Message_FilerOpenDir            *       &400
Message_FilerCloseDir           *       &401
Message_FilerOpenDirAt          *       &402
Message_FilerSelectionDir       *       &403
Message_FilerAddSelection       *       &404
Message_FilerAction             *       &405
Message_FilerControlAction      *       &406
Message_FilerSelection          *       &407
Message_FilerDeviceDir          *       &408
Filer_FormatNative              *       &1
Filer_DirNoncanonical           *       &1
Filer_DisplayLargeIcons         *       &0
Filer_DisplaySmallIcons         *       &1
Filer_DisplayFullInfo           *       &2
Filer_Display                   *       &3
Filer_DisplayShift              *       0
Filer_SortByName                *       &0
Filer_SortBySize                *       &1
Filer_SortByType                *       &2
Filer_SortByDate                *       &3
Filer_Sort                      *       &C
Filer_SortShift                 *       2
Filer_GivenDisplay              *       &10
Filer_GivenSort                 *       &20
Filer_ControlAcknowledge        *       &0
Filer_ControlVerboseOn          *       &1
Filer_ControlVerboseOff         *       &2

;Symbols for structure offsets and sizes
                                ^       0
                                #       Int
Filer_Control                   *       @

                                ^       0
Filer_MessageOpenDir_fs_no      #       FileSwitch_FSNo
Filer_MessageOpenDir_reserved   #       3*Byte
Filer_MessageOpenDir_flags      #       Bits
Filer_MessageOpenDir_dir_name   #       228*Char
Filer_MessageOpenDir            *       @

                                ^       0
Filer_MessageOpenDirAt_fs_no    #       FileSwitch_FSNo
Filer_MessageOpenDirAt_reserved #       3*Byte
Filer_MessageOpenDirAt_flags    #       Bits
Filer_MessageOpenDirAt_at       #       OS_Coord
Filer_MessageOpenDirAt_width    #       Int
Filer_MessageOpenDirAt_height   #       Int
Filer_MessageOpenDirAt_display  #       Byte
Filer_MessageOpenDirAt_dir_name #       211*Char
Filer_MessageOpenDirAt          *       @

                                ^       0
Filer_MessageSelectionDir_dir_name #       236*Char
Filer_MessageSelectionDir       *       @

                                ^       0
Filer_MessageAddSelection_leaf_list #       236*Char
Filer_MessageAddSelection       *       @

                                ^       0
Filer_MessageAction_operation   #       FilerAction_Operation
Filer_MessageAction_options     #       FilerAction_Flags
Filer_MessageAction_data        *       @
Filer_MessageAction_data_destination_dir_name #       228*Char
                                ^       Filer_MessageAction_data
Filer_MessageAction_data_access_access #       Short
Filer_MessageAction_data_access_mask #       Short
                                ^       Filer_MessageAction_data
Filer_MessageAction_data_file_type #       Bits
                                ^       Filer_MessageAction_data
Filer_MessageAction_data_find_leaf #       228*Char
Filer_MessageAction             *       @

                                ^       0
Filer_MessageControlAction_control #       Filer_Control
Filer_MessageControlAction      *       @

                                ^       0
Filer_MessageSelection_bbox     #       OS_Box
Filer_MessageSelection_width    #       Int
Filer_MessageSelection_height   #       Int
Filer_MessageSelection_display  #       Bits
Filer_MessageSelection_col0     #       Int
Filer_MessageSelection_row0     #       Int
Filer_MessageSelection_col1     #       Int
Filer_MessageSelection_row1     #       Int
Filer_MessageSelection          *       @

                                ^       0
Filer_MessageDeviceDir_path_name #       236*Char
Filer_MessageDeviceDir          *       @

                                ^       0
Filer_FullMessageOpenDir        Wimp_MessageHeader_MEMBERS
Filer_FullMessageOpenDir_fs_no  #       FileSwitch_FSNo
Filer_FullMessageOpenDir_reserved #       3*Byte
Filer_FullMessageOpenDir_flags  #       Bits
Filer_FullMessageOpenDir_dir_name #       228*Char
Filer_FullMessageOpenDir        *       @

                                ^       0
Filer_FullMessageOpenDirAt      Wimp_MessageHeader_MEMBERS
Filer_FullMessageOpenDirAt_fs_no #       FileSwitch_FSNo
Filer_FullMessageOpenDirAt_reserved #       3*Byte
Filer_FullMessageOpenDirAt_flags #       Bits
Filer_FullMessageOpenDirAt_at   #       OS_Coord
Filer_FullMessageOpenDirAt_width #       Int
Filer_FullMessageOpenDirAt_height #       Int
Filer_FullMessageOpenDirAt_display #       Byte
Filer_FullMessageOpenDirAt_dir_name #       211*Char
Filer_FullMessageOpenDirAt      *       @

                                ^       0
Filer_FullMessageSelectionDir   Wimp_MessageHeader_MEMBERS
Filer_FullMessageSelectionDir_dir_name #       236*Char
Filer_FullMessageSelectionDir   *       @

                                ^       0
Filer_FullMessageAddSelection   Wimp_MessageHeader_MEMBERS
Filer_FullMessageAddSelection_leaf_list #       236*Char
Filer_FullMessageAddSelection   *       @

                                ^       0
Filer_FullMessageAction         Wimp_MessageHeader_MEMBERS
Filer_FullMessageAction_operation #       FilerAction_Operation
Filer_FullMessageAction_options #       FilerAction_Flags
Filer_FullMessageAction_data    *       @
Filer_FullMessageAction_data_destination_dir_name #       228*Char
                                ^       Filer_FullMessageAction_data
Filer_FullMessageAction_data_access_access #       Short
Filer_FullMessageAction_data_access_mask #       Short
                                ^       Filer_FullMessageAction_data
Filer_FullMessageAction_data_file_type #       Bits
                                ^       Filer_FullMessageAction_data
Filer_FullMessageAction_data_find_leaf #       228*Char
Filer_FullMessageAction         *       @

                                ^       0
Filer_FullMessageControlAction  Wimp_MessageHeader_MEMBERS
Filer_FullMessageControlAction_control #       Filer_Control
Filer_FullMessageControlAction  *       @

                                ^       0
Filer_FullMessageSelection      Wimp_MessageHeader_MEMBERS
Filer_FullMessageSelection_bbox #       OS_Box
Filer_FullMessageSelection_width #       Int
Filer_FullMessageSelection_height #       Int
Filer_FullMessageSelection_display #       Bits
Filer_FullMessageSelection_col0 #       Int
Filer_FullMessageSelection_row0 #       Int
Filer_FullMessageSelection_col1 #       Int
Filer_FullMessageSelection_row1 #       Int
Filer_FullMessageSelection      *       @

                                ^       0
Filer_FullMessageDeviceDir      Wimp_MessageHeader_MEMBERS
Filer_FullMessageDeviceDir_path_name #       236*Char
Filer_FullMessageDeviceDir      *       @

                                ^       0
Filer_Format_next               #       Ptr
Filer_Format_menu_text          #       Ptr
Filer_Format_help_text          #       Ptr
Filer_Format_disc_format_swi    #       Int
Filer_Format_disc_format_handle #       Int
Filer_Format_layout_structure_swi #       Int
Filer_Format_layout_structure_handle #       Int
Filer_Format_flags              #       Bits
Filer_Format                    *       @


;Symbols for SWI's and SWI reason codes
Service_StartFiler              *       &4B
   ;Entry
   ;  R0 = task (Wimp_T)
   ;  R1 = &4B
   ;Exit
   ;  R0 -> command (String)
   ;  R1 = unclaimed (Bool)

Service_StartedFiler            *       &4C
   ;Entry
   ;  R1 = &4C

Service_FilerDying              *       &4F
   ;Entry
   ;  R1 = &4F

Service_EnumerateFormats        *       &6A
   ;Entry
   ;  R1 = &6A
   ;  R2 = format_list (pointer to Filer_Format)
   ;Exit
   ;  R2 = format_list_out (pointer to Filer_Format)

Service_DiscDismounted          *       &7D
   ;Entry
   ;  R1 = &7D
   ;  R2 -> disc_name (String)

        ]
        END
